/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.felinelayer.sample;

import br.com.felinelayer.common.Message;
import br.com.felinelayer.common.Protocol;
import br.com.felinelayer.server.application.ButtonServer;
import br.com.felinelayer.server.application.ComponentServer;
import br.com.felinelayer.server.application.FrameServer;
import br.com.felinelayer.server.application.IEventListenerServer;

/**
 *
 * @author Vanius Roberto Bittencourt
 */
public class SecondFrame extends FrameServer {
    
    /**
     *
     */
    @Override
    public void initialize() {
        setText( getId() + "" );
        setLeft( 50 ).setTop( 50 ).setWidth( 200 ).setHeight( 200 );
        addEdit().setCol( 1 );
        addRow();
        addEdit().setCol( 1 );
        addRow();
        ButtonServer b = addButton().setCol( 1 ).setText( "fechar" );
        b.addEventListener( Protocol.EVENT_CLICK, new IEventListenerServer() {
            @Override
            public void onEvent( ComponentServer sender, String eventName, Message message ) {
                close();
            }
        } );
    }
}
